#include"ThreadPool.hpp"
#include"Task.hpp"
#include<unistd.h>
using namespace ThreadPoolModule;
//using t_task = void (*)();
int main()
{
    Enable_Console_Log_Strategy();
    ThreadPool<t_tast> t;
    int count = 10;
    //sleep(1);
    t.Start();
    //sleep(1);
    while(count--)
    {
        t.Enqueue(UpLode);
        //sleep(1);  // 为什么不加sleep会出现Fatal glibc error: ../nptl/pthread_mutex_lock.c:94 (__pthread_mutex_cond_lock): assertion failed: mutex->__data.__owner == 0
    }
    
    //sleep(2);
    t.Stop();
    //sleep(2);
    t.join();

    //sleep(3);
    return 0;
}
